Set up Thinklet
Set up Thinklet
2024-12-13
code::
% scrcpy
* daemon not running; starting now at tcp:5037
* daemon started successfully
ERROR: Could not find any ADB device
ERROR: Server connection failed
forgetting to turn on the power
code::
% scrcpy
INFO: ADB device found:
INFO: --> (usb) P16M116D5252823 device THINKLET_LC01
/opt/homebrew/Cellar/scrcpy/3.0.2/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 6.1 MB/s (90396 bytes in 0.014s)
server WARN: Audio disabled: it is not supported before Android 11 INFO: Renderer: metal
WARN: Demuxer 'audio': stream explicitly disabled by the device
INFO: Texture: 1080x1920
I happened to see the chat application in the background.
Well, it's not a clean read, but it's a resolution that shows what kind of project and what kind of channels.
[Android Studio
sample code
Run debugging from Android Studio and install this app in THINKLET.
However, when debugging for the first time, we have not implemented Permission to allow it, so it just launches an app that can't do anything.
I ran debugging build.gradle and nothing happened? I thought it was the application that started and terminated, but I can't do anything about it?
23:12:29: Executing...
23:12:30: Execution finished.
o1 Pro.iconRunning "build.gradle" does not install the application; you must actually build the application and install it on the device (THINKLET) by pressing the "Run" (or "Debug") button from the top toolbar of Android Studio.
nishio.iconThe "Run" (or "Debug") button, grayed out.
o1 Pro.iconLack of proper Run Configuration
Select "Edit Configurations..." from the top toolbar. from the top toolbar and check if there is a Run Configuration for the "app" module. If not, create a new one.
nishio.icon
Select "Edit Configurations..." from the top toolbar. from the top toolbar and check if there is a Run Configuration for the "app" module. If not, create a new one.
How do you do it?
o1 Pro.icon
From the top bar of the Android Studio menu, open "Run" -> "Edit Configurations..." from the top bar of the Android Studio menu.
Click the "+ (plus button)" in the upper left corner of the dialog that appears.
Select "Android App" (or "Android Application") from the list.
Select the "app" module of your project in the "Module" field.
nishio.icon
Select the "app" module for your project in the "Module" field.
I can't choose.
o1 Pro.iconPossible reasons for not being able to select the "app" module include
Individual files and subfolders are open, not the project root directory
Please "Open" the root directory of the entire cloned GitHub project (the directory where settings.gradle is located) in Android Studio.
I was able to do it!
https://gyazo.com/a66536f17227cff98750a2900af35028
I'm an amateur Android developer, so I opened the project the wrong way. w
I was even able to record it.
% adb shell am start -n com.example.fd.camera/com.example.fd.camera.MainActivity
Starting: Intent { cmp=com.example.fd.camera/.MainActivity }
Key configurations were also made!
Now you can start recording without a PC.
next:
---
This page is auto-translated from /nishio/Thinkletをセットアップ using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.